<template>
  <the-table
    ref="table"
    :columns="columns"
    uri="agency-accounts"
    @loaded="loaded"
  >
  </the-table>
</template>
<script>
import moment from 'moment'
const columns = [
  {
    title: 'ID',
    dataIndex: 'id',
    width: 60,
  },
  {
    title: '代理名',
    dataIndex: 'username',
    searchAble: true,
  },
  {
    title: '时间段',
    dataIndex: 'created_at',
    dataType: 'range',
    visible: false,
    searchAble: true,
    search: {
      value: [moment(), moment()],
    },
  },
  // {
  //   title: '可动币值',
  //   dataIndex: 'coins',
  //   searchAble: false,
  // },
  {
    title: '代理收益',
    dataIndex: 'tip_fee',
  },
  {
    title: '订单佣金',
    dataIndex: 'fee_sum',
  },
  {
    title: '奖励',
    dataIndex: 'tip_sum',
  },
  {
    title: '已领',
    dataIndex: 'cut',
  },
  {
    title: '下级人数',
    dataIndex: 'subs_count',
  },
  // {
  //   title: '买币总数',
  //   dataIndex: 'boughts_sum_coins',
  // },
  // {
  //   title: '买币笔数',
  //   dataIndex: 'boughts_count',
  // },
]

import theTable from '@/components/theTable.vue'
import tableFooter from '@/mixins/table-footer.js'
export default {
  components: { theTable },
  mixins: [tableFooter],
  data() {
    return {
      columns,
    }
  },
}
</script>
